package com.ruoyi.mdm.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.mdm.domain.SkuMaster;
import com.ruoyi.mdm.domain.SkuMasterSubImport;
import com.ruoyi.mdm.domain.SkuMergeMasterSubImport;

/**
 * sku主档Service接口
 *
 * @author shiseido
 * @date 2025-03-01
 */
public interface ISkuMasterService {
    /**
     * 查询sku主档
     *
     * @param id sku主档主键
     * @return sku主档
     */
    public SkuMaster selectSkuMasterById(Long id);

    /**
     * 查询sku主档
     *
     * @param skumCode sku主档主键
     * @return sku主档
     */
    public List<SkuMaster> selectSkuMasterBySkumCode(String skumCode);

    /**
     * 查询sku主档
     *
     * @param spuCode sku主档主键
     * @return sku主档
     */
    public List<SkuMaster> selectSkuMasterBySpuCode(String spuCode);

    /**
     * 查询sku主档列表
     *
     * @param skuMaster sku主档
     * @return sku主档集合
     */
    public List<SkuMaster> selectSkuMasterList(SkuMaster skuMaster);

    /**
     * 新增sku主档
     *
     * @param skuMaster sku主档
     * @return 结果
     */
    public int insertSkuMaster(SkuMaster skuMaster);

    /**
     * 修改sku主档
     *
     * @param skuMaster sku主档
     * @return 结果
     */
    public int updateSkuMaster(SkuMaster skuMaster);

    /**
     * 批量删除sku主档
     *
     * @param ids 需要删除的sku主档主键集合
     * @return 结果
     */
    public int deleteSkuMasterByIds(Long[] ids);

    /**
     * 删除sku主档信息
     *
     * @param id sku主档主键
     * @return 结果
     */
    public int deleteSkuMasterById(Long id);

    /**
     * 同步SKU到ES
     *
     * @param skuMasterList spu信息
     */
    public void syncSkuToEs(List<SkuMaster> skuMasterList, boolean delAllFlag);

    /**
     * 导入产品
     *
     * @param skuMasterSubImportList         推荐渠道数据列表
     * @param operName                  操作用户
     * @return 结果
     */
    public List<Map> importSkuMasterSub(List<SkuMasterSubImport> skuMasterSubImportList,
                                        List<SkuMergeMasterSubImport> spuContentList,
                                        String operName);


    public int skuPriceCompare();


}
